const fs = require("fs");

/**
 * fs.writeFileSync: 同步且覆盖的形式写入内容
 * 
 * 语法：
 * fs.writeFileSync("路径","写入内容",[配置项])
 * 
 * */ 

try {
    fs.writeFileSync("./data/04.txt","君不见高堂明镜悲白发，朝如青丝暮成雪；")
    console.log("写入成功");
} catch (error) {
    console.log("写入失败：",error);
}



